package org.turbobytes.unikey.helper;

import org.turbobytes.unikey.util.db.metadata.DbType;

/**
 * Core Interface that exposes methods to retrieve SQL statements. This is a
 * generic interface whose implementations should statically resolve the type
 * parameters while implementing the interface. This makes the implementation to
 * work with different kind of XML parsers.
 * 
 * @author Gopalakrishnan T
 * @since Aug 25, 2010
 */

public interface SqlRetriever {

  /**
   * To retrive the SQL script for Creating table.
   * 
   * @param dbType -
   *          Represents the current DB in use
   * 
   * @return SQL script for creating table.
   */
  public String getCreateScript(DbType dbType);

  /**
   * To retrive the SQL script for updating records in the table.
   * 
   * @param dbType -
   *          Represents the current DB in use
   * 
   * @return SQL script for updating records in to the table.
   */
  public String getUpdateScript(DbType dbType);

  /**
   * To retrive the SQL script for inserting records in to the table.
   * 
   * @param dbType -
   *          Represents the current DB in use
   * 
   * @return SQL script for inserting records in to the table.
   */
  public String getInsertScript(DbType dbType);

  /**
   * To retrive the SQL script for selecting records from the table.
   * 
   * @param dbType -
   *          Represents the current DB in use
   * 
   * @return SQL script for selecting records in to the table.
   */
  public String getSelectScript(DbType dbType);

}
